<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button>下一页</button>
    <script>
        let num = 1
        let button = document.querySelector('button')
        let key
        button.addEventListener('click', function (params) {
            if(key===true){
                return
            }
            key=true
            num++
            setTimeout(function(params){
                console.log(`第${num}页`)
                key=false
            },2000)
        })
    </script>
</body>

</html>